package com.lqk.facade;

/**
 * @author lqk
 * @date 2021/12/6 18:17
 *
 * 投影仪
 */
public class Projector {
    private Projector(){

    }
    // 使用单例模式，静态内部类
    private static class ProjectorInstance{
        private static final Projector INSTANCE = new Projector();
    }

    // 提供一个静态的公有方法，直接返回 SingletonInstance.INSTANCE
    public static Projector getInstance(){
        return Projector.ProjectorInstance.INSTANCE;
    }

    public void on(){
        System.out.println(" Projector on ");
    }
    public void off(){
        System.out.println(" Projector off ");
    }
    public void focus(){
        System.out.println(" popcorn is focusing ");
    }
}
